<template>
  <router-view />
</template>

<script setup>
import { onMounted } from 'vue'
import { useAuthStore } from '@/stores/auth'
import { useCoursesStore } from '@/stores/courses'
import { useUsersStore } from '@/stores/users'

const authStore = useAuthStore()
const coursesStore = useCoursesStore()
const usersStore = useUsersStore()

onMounted(() => {
  // 初始化数据
  authStore.initializeAuth()
  coursesStore.initializeCourses()
  usersStore.initializeUsers()
})
</script>

<style>
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

#app {
  min-height: 100vh;
}
</style>
